import { dateFormat } from '@/util/date';
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd');
export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  addBtn: false,
  menu: false,
  searchMenuSpan: 6,
  selection: true,
  height: 450,
  "column": [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      hide: true,
      display: false
    },	  {
      "type": "input",
      "label": "线路编码",
      "prop": "lineCode",
      hide: true
    },	  {
      "type": "input",
      "label": "车站编码",
      "prop": "stationCode",
      hide: true
    },	  {
      "type": "input",
      "label": "售票员ID",
      "prop": "conductorId",
      hide: true
    },	  {
      "type": "input",
      "label": "售票员",
      "prop": "conductorName",
      search: true,
      params: {
        userCodeKey: 'conductorJobNo'
      },
      component: 'user-select',
    },	  {
      "type": "input",
      "label": "售票员员工号",
      "prop": "conductorJobNo"
    },	  {
      "type": "select",
      "label": "车票类型",
      "prop": "cardType",
      search: true,
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      cascaderItem: ["ticketName"],
    },	  {
      "type": "select",
      "label": "车票名称",
      "prop": "ticketName",
      search: true,
      dicFlag: false,
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}'
    },	  {
      "type": "input",
      "label": "售卖数量",
      "prop": "cardNumber"
    },	  {
      "type": "number",
      "label": "售卖金额",
      "prop": "issueAmount",
	  precision: 2,
    },	  {
      "type": "select",
      "label": "售卖类型",
      "prop": "issueType",
      search: true,
      dicData: [
        {
          label: "售卖",
          value: "售卖"
        },
        {
          label: "废票",
          value: "废票"
        },
        {
          label: "退换票",
          value: "退换票"
        }
      ],
    },	  {
      "type": "date",
      "label": "售卖时间",
      "prop": "issueTime",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      search: true,
      searchValue: [startDate, endDate],
      searchRange: true,
      searchSpan: 12
    },	  {
      "type": "input",
      "label": "备注",
      "prop": "remark"
    },	  {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      hide: true,
      display: false
    },	  {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      hide: true,
      display: false
    },	  {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      hide: true,
      display: false
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
      display: false
    },	  {
      "type": "input",
      "label": "数据更新时间",
      "prop": "updateTime",
      hide: true,
      display: false
    }]
}
